package com.design_pattern._01_create._03_prototype;

public class TestDriver {
    public static void main(String[] args) throws CloneNotSupportedException {
        Person person = Person.getBuilder().buildBasic("name", 30, 177).buildLoc("青岛", "120", "40").build();
        Person clone = person.clone();
        System.out.println("person.city == clone.city = " + (person.city == clone.city));
        clone.name = "法外狂徒张三";
        System.out.println("person.name = " + person.name);
        System.out.println("clone.name = " + clone.name);
        System.out.println("clone.name == person.name = " + (clone.name == person.name));
    }
}